<?php
namespace Modules\ShopApi\Models;
use Modules\Admin\Services\UserService; 
class ShopRechargeLog extends BaseApiModel
{	
	
	
	/**
     * @name  获取充值记录列表
     */
	public function get_recharge_log_list(){
		$user_info = (new UserService())->my();
		$where = [
			'status'=>1,
			'user_id'=>$user_info['id']
		];
		$list = $this->select('id','total_money','deliver_money','updated_at')
			->orderBy('id','desc')
			->where($where)
			->paginate(20)
			->toArray();
		return $this->api_success(['data'=>[
				'data'			=> $list['data'],
				'last_page'		=> $list['last_page'],
				'per_page'		=> $list['per_page'],
				'current_page'	=> $list['current_page'],
				'total' 		=> $list['total']
			]]);
	}
	
}
